<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>Document</title>
</head>

<body>
    <div>index3：读ls</div>
    <p></p>
    <script>
        document.querySelector('div').addEventListener('click', function () {

            alert("我是localStorage的key为a的值：" + localStorage.getItem("a"))
        }, false);
    </script>
    <a href="javascript:self.close()">关闭窗口</a>
</body>

</html>